package com.song.controller;

import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin(origins = "*")
@Api(tags = "测试")
@RequestMapping("test")
@RestController
public class TestController {
    @GetMapping("test01")
    public String test01(String name){
        System.out.println(name+"==参数显示");
        if (name==null){
            name="不写名字的黑煤球";
        }
        return "恭喜你 ‘"+name+"’,连接成功了";
    }
}
